Generate configuration parameters overview - #5932
Draft
mpkorstanje wants to merge 62 commits into
Draft
Conversation
mpkorstanje
force-pushed
the
feature/generate-configuration-parameters-overview
branch
from
July 30, 2026 21:38
c73e0df to
14ffed5
Compare
mpkorstanje
commented
Jul 30, 2026
mpkorstanje
force-pushed
the
feature/generate-configuration-parameters-overview
branch
from
July 30, 2026 22:58
f02ff2f to
3295a99
Compare
marcphilipp
reviewed
Jul 31, 2026
mpkorstanje
force-pushed
the
feature/generate-configuration-parameters-overview
branch
2 times, most recently
from
July 31, 2026 08:52
6c063a1 to
e6ab635
Compare
mpkorstanje
force-pushed
the
feature/generate-configuration-parameters-overview
branch
from
July 31, 2026 09:57
e6ab635 to
314e8fd
Compare
mpkorstanje
commented
Aug 9, 2026
mpkorstanje
commented
Aug 10, 2026
mpkorstanje
commented
Aug 10, 2026
| * <p>The default behavior is not to perform auto-detection. | ||
| */ | ||
| // TODO: Handle @link references. | ||
| @ConfigurationParameter(defaultValue = @Value(booleanValue = false)) |
Member
Author
There was a problem hiding this comment.
@marcphilipp to keep the documentation and implementation consistent I think it would help to extract all the default values to constants and use them when parsing configuration parameters. Thoughts?
mpkorstanje
commented
Aug 10, 2026
| * <p>Value must be a positive decimal number; defaults to {@code 1}. | ||
| * | ||
| */ | ||
| @ConfigurationParameter(type = BigDecimal.class, defaultValue = @Value(doubleValue = 1.0)) |
Member
Author
There was a problem hiding this comment.
Do we really need infinite precision here?
mpkorstanje
commented
Aug 10, 2026
| * @see Timeout#DEFAULT_TIMEOUT_PROPERTY_NAME | ||
| */ | ||
| // TODO: TimeoutDuration is not part of the public API | ||
| @ConfigurationParameter /*(type = TimeoutDuration.class)*/ |
Member
Author
There was a problem hiding this comment.
Not sure about this yet. We could use a string here, but TimeoutDuration has a specific format.
TODO: Investigate how this works with Duration in Spring.
mpkorstanje
force-pushed
the
feature/generate-configuration-parameters-overview
branch
from
August 11, 2026 03:12
c7753c0 to
dc9a43a
Compare
✅ All tests passed ✅🏷️ Commit: 98f0885 Learn more about TestLens at testlens.app. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generate
META-INF/junit-platform-configuration-metadata.jsonin the format of Spring Boots Configuration Metadata.Minimal example
The minimal usage:
Produces:
{ "properties": [ { "name": "org.example.property", "description": "A brief multi-line description of this property.", "sourceType": "com.example.app.Constants" } ] }This takes all the information from the obvious places. Of note is that the first paragraph from the doc string is used and the
: {@value}.that we conventionally use is replaced with a..Deprecation
Produces:
{ "properties": [ { "name": "org.example.property", "description": "A brief multi-line description of this property.", "sourceType": "com.example.app.Constants", "deprecated": { } } ] }The empty
deprecatedobject is sufficient to mark a field as deprecated. To fill out the fields in thedeprecatedobject the@Deprecationannotation can be used:Type and default
The type of the parameter can be provided using the
typeproperty of the annotation.Though in practice this will be rarely needed. If the type is not provided, we can take the type of the default value.
When using Enums it is useful to use both type and default value, because arbitrary enums can't be used in an annotation.
Limitations
Metadata.groups,Metadata.hints,Metadata.ignoredare not yet implemented. They might be useful later on, but we don't need them yet.Property.defaultsupports lists of values, the implementation is intentionally limited to a single value.Closes: #4330
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@APIannotations